import axios from '@u/request'
// 商品列表获取
const fetchItems = (params = {}) => {
  return axios.get('/itemLists', {params})
}
// 批量添加商品接口
const addMulItems = (params) => {
  return axios.post('/addMulItems', params)
}
// 修改商品
const updateItem = (params) => {
  return axios.put('/updateItem', params)
}
// 新增商品
const addItem =  (params) => {
  return axios.post('/addItem', params)
}
// 获取商品详情
const fetchItemDetail =  (params) => {
  return axios.get("/getItemDetail", {params})
}
// 删除商品
const removeItem = (params = {}) => {
  return axios.delete("/delItem", {params})
}
export {
  fetchItems,
  addMulItems,
  updateItem,
  addItem,
  fetchItemDetail,
  removeItem
}